package cang.string.Day03.File;

import java.io.File;

public class DeleteDemo {
    public static void main(String[] args) {
        /*
        删除一个文件
         */
        File file = new File("./test.txt");
        boolean deleted = file.delete();
        if (deleted){
            System.out.println("删除成功");
        }else {
            System.out.println("删除失败");
        }
    }
}
